﻿<UserControl x:Class="MediaPad.Implementation.UpDown"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:MediaPad.Implementation">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition Width="16"/>
        </Grid.ColumnDefinitions>

        <Border BorderThickness="1" BorderBrush="Gray" Margin="2" 
                Grid.RowSpan="2" HorizontalAlignment="Stretch">

            <TextBlock TextAlignment="Right" Padding="5"
                Text="{Binding RelativeSource={RelativeSource FindAncestor, 
                               AncestorType={x:Type local:UpDown}}, 
                               Path=Value}"/>
        </Border>

        <RepeatButton Name="upButton" Click="upButton_Click" 
                      Grid.Column="1" Grid.Row="0" Background="Transparent" BorderThickness="1">
            <TextBlock Width="8" Height="8" Text="5" FontFamily="Webdings" FontSize="8" Foreground="#FFFFFFFF" />
        </RepeatButton>

        <RepeatButton Name="downButton" Click="downButton_Click" 
                      Grid.Column="1" Grid.Row="1" Background="Transparent" BorderThickness="1"
                      >
            <TextBlock Width="8" Height="8" Text="6" FontFamily="Webdings" FontSize="8" Foreground="#FFFFFFFF" />
        </RepeatButton>

    </Grid>
</UserControl>
